package ua.com.rozetka.tests;

import ua.com.rozetka.pages.HomePage;
import ua.com.rozetka.pages.SearchResultsPage;
import org.testng.annotations.Test;
import ua.com.rozetka.utils.Checker;
import ua.com.rozetka.utils.TestData;

public class Search extends BaseTest {

    @Test
    public void searchGuiTest() {
        SearchResultsPage searchResultsPage = new HomePage().searchFor(data);
        boolean isGuiCorrect = searchResultsPage.verifyGuiForProduct(data);
        Checker.checkTrue(isGuiCorrect);
    }

    @Test
    public void searchResultsTest() {
        SearchResultsPage searchResultsPage = new HomePage().searchFor(data);
        boolean isProductPresent = searchResultsPage.isProductPresent(data);
        Checker.checkTrue(isProductPresent);
    }

}